$tooltip-fontsize-lg: rem(1) !default;
$tooltip-fontsize-sm: rem(1.4) !default;
$tooltip-height-lg: rem(2.2) !default;
$tooltip-height-sm: rem(3.2) !default;
$tooltip-top-margin-lg: rem(1.4) !default;
$tooltip-top-margin-sm: rem(2.4) !default;
$tooltip-lr-padding-lg: rem(0.8) !default;
$tooltip-lr-padding-sm: rem(1.6) !default;
$tooltip-max-width: rem(3.20) !default;

md-tooltip {
  position: absolute;
  z-index: $z-index-tooltip;
  overflow: hidden;
  pointer-events: none;
  border-radius: 4px;

  font-weight: 500;
  font-size: $tooltip-fontsize-sm;
  @media (min-width: $layout-breakpoint-sm) {
    font-size: $tooltip-fontsize-lg;
  }

  .md-content {
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform-origin: center top;
    transform: scale(0);
    opacity: 0;
    height: $tooltip-height-sm;
    line-height: $tooltip-height-sm;
    padding-left: $tooltip-lr-padding-sm;
    padding-right: $tooltip-lr-padding-sm;
    @media (min-width: $layout-breakpoint-sm) {
      height: $tooltip-height-lg;
      line-height: $tooltip-height-lg;
      padding-left: $tooltip-lr-padding-lg;
      padding-right: $tooltip-lr-padding-lg;
    }
    &.md-show-add {
      transition: $swift-ease-out;
      transition-duration: .2s;
      transform: scale(0);
      opacity: 0;
    }
    &.md-show, &.md-show-add-active {
      transform: scale(1);
      opacity: 0.9;
      transform-origin: center top;
    }
    &.md-show-remove {
      transition: $swift-ease-out;
      transition-duration: .2s;
      &.md-show-remove-active {
        transform: scale(0);
        opacity: 0;
      }
    }
  }

  &.md-hide {
    transition: $swift-ease-in;
  }

  &.md-show {
    transition: $swift-ease-out;
    pointer-events: auto;
  }
}
